package com.emep.changzhi.analyse.repository.basics;

import com.emep.changzhi.analyse.entity.basics.SysAreaInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;

import javax.transaction.Transactional;

/**
 * @author xy
 * @Description: 行政区划持久层
 * @date 2018/2/24 14:03
 * @version V1.0
 */
public interface SysAreaInfoRepository extends BaseRepository<SysAreaInfo, Long> {

    @Modifying
    @Transactional
    Integer deleteById(String id);

    SysAreaInfo findAreaById(String id);

    Page<SysAreaInfo> findAll(Specification<SysAreaInfo> spec, Pageable pageable);

    SysAreaInfo findSysAreaInfoByAreaCode(String areaCode);
}
